<!DOCTYPE>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>消息管理</title>
    <link rel="stylesheet" type="text/css" href="../../static/lib/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="../../static/plugin/layer/skin/layer.css">
    <link rel="stylesheet" href="../../static/css/x-admin.css" media="all">
    <link rel="stylesheet" href="../../static/css/dj-css.css">
    <link rel="stylesheet" type="text/css" href="list.css">
</head>
<body>
<div id="app" class="x-body">
    <div class="clearfix" style="height:51px;">
        <form class="layui-form layui-inline" action="">

            <div class="layui-inline" >
                <label class="layui-form-label" style="font-weight:bold;">标题：</label>
                <div class="layui-input-inline">
                    <input type="text" autocomplete="off" placeholder="请输入标题或标题关键字" class="layui-input" v-model="keyWord">
                </div>
            </div>
            <div class="dj-select dj-select-inline">
                <label   style="height:auto;padding:3px 15px;width:110px;text-align: right;font-weight: bold;">消息类型</label>
                <div class="dj-select-content" style="width: 196px;">
                    <div class="dj-select-input" flag = 'true' style="width: 190px;">
                        <span class="dj-selected readOnly" type="text" name=""  selectedCode='' style="height:32px;line-height:32px;width: 190px;" id="keyWord2">请选择消息类型</span>
                        <i></i>
                    </div>
                    <ul class="dj-select-list" style="width: 190px;">
                        <li code="">请选择消息类型</li>
                        <li v-for="item in msgType" :code="item.code">{{item.name}}</li>
                    </ul>
                </div>
            </div>

            <div class="dj-select dj-select-inline">
                <label   style="height:auto;padding:3px 15px;width:110px;text-align: right;font-weight: bold;">消息状态</label>
                <div class="dj-select-content" style="width: 196px;">
                    <div class="dj-select-input" flag = 'true' style="width: 190px;">
                        <span class="dj-selected readOnly" type="text" name=""  selectedCode='' style="height:32px;line-height:32px;width: 190px;" id="keyWord3">请选择消息状态</span>
                        <i></i>
                    </div>
                    <ul class="dj-select-list" style="width: 190px;">
                        <li code="">请选择消息状态</li>
                        <li v-for="item in msgStatus" :code="item.code">{{item.name}}</li>
                    </ul>
                </div>
            </div>

        </form>
        <div class="layui-btn-group  layui-inline" style="padding-left:35px;">
            <button class="layui-btn" @click="check">查询</button>
            <button class="layui-btn add but-green">添加</button>
            <button class="layui-btn but-orange" @click="delMulti">批量删除</button>
        </div>
    </div>
    <div class="tableWrap">
        <table class="" border="0" cellspacing="0" cellpadding="0">
            <thead>
            <tr>
                <th class="por w40" @click="allChose">
                    <input class="checkbox allChose" :checked="allChoseFlag"  type="checkbox" name="like1[write]" lay-filter="allChoose" :value="'al'" v-model="delMultiFlag">
                    <i class="layui-icon" :class="{'checkedColor':allChoseFlag}">&#xe618;</i>
                </th>
                <th>标题</th>
                <th>发布人</th>
                <th>接收对象</th>
                <th>消息类型</th>
                <th>状态</th>
                <th>附件</th>
                <th style="width:300px;">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr v-for="(item,index) in messagesLists" v-if="item.id" :class="{'read':item.readTime}">
                <td  class="por" @click="selectSelf(item)">
                    <input class="checkbox" :value="item.id" type="checkbox" name="" :checked="item.checked" v-model="delMultiFlag">
                    <i class="layui-icon"  :class="{'checkedColor':item.checked}">&#xe618;</i>
                </td>
                <td style="line-height: 40px;">
                    <i v-show="!(item.readTime)" style="float:left;margin:5px 5px 0 0;display: inline-block;width:30px;height:30px;background:url('../../static/images/read.jpg') 3px 1px no-repeat;vertical-align: middle;"></i>
                    <i v-show="item.readTime" style="float:left;margin:5px 5px 0 0;display: inline-block;width:30px;height:30px;background:url('../../static/images/read.jpg')  3px -30px no-repeat;vertical-align: middle;"></i>
                    <!--<span style="vertical-align: middle;">-->{{item.title}}<!--</span>-->
                </td>
                <td v-text="item.publish" ></td>
                <td v-text="item.receiveName" ></td>
                <td>{{item.type | showType}}</td>
                <td>{{item.status | statusFilter}}</td>
                <td>{{item.attachMent | showFile}}</td>
                <td>
                    <div class="layui-btn-group flexBox">
                        <button class="layui-btn" @click="editMessages(item)">查看</button>
                        <button class="layui-btn but-orange" @click="delMessages(item)">删除</button>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <div id="page" class="fl fs14"></div>
    <div class="layui-laypage-curr pageHideFlag" style="text-align: center;line-height: 30px;height:30px;margin-top:10px;font-size: 0;float:left;">
        <span class="layui-laypage-next" style="display: inline-block;height:28px;font-size: 12px;color:#333;border:1px solid #e2e2e2;padding:0 10px;">
            共 {{totalNum}} 条数据
        </span>
    </div>
    <div class="layui-laypage-curr pageShowFlag" style="display: none;text-align: center;line-height: 30px;height:30px;margin-top:10px;font-size: 0;float:left;">

        <span class="layui-laypage-curr" style="display: inline-block;width:38px;height:30px;background: #5eabed;border:1px solid #5eabed;">
            <em style="font-style: normal;font-size: 12px;color:#fff;">1</em>
        </span>
        <span class="layui-laypage-next" style="display: inline-block;height:30px;font-size: 12px;color:#333;border:1px solid #e2e2e2;padding:0 10px;">
            共 {{totalNum}} 条数据
        </span>
    </div>
</div>
<script src="../../static/lib/jquery.min.js"></script>
<script src="../../static/lib/layui/layui.js" charset="utf-8"></script>
<script src="../../static/lib/vue.min.js"></script>
<script src="../../static/lib/x-layui.js"></script>
<script src="../../static/lib/dj-js.js"></script>

<script src="list.js"></script>
